package com.partners.dao.basic;

import com.partners.dao.bo.RoleDO;
import com.partners.dao.dto.RoleUserOutputDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface RoleDao {
    int deleteByPrimaryKey(Integer id);

    int insert(RoleDO record);

    int insertSelective(RoleDO record);

    RoleDO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(RoleDO record);

    int updateByPrimaryKey(RoleDO record);

    List<Map<String,Object>> getRoleList(@Param("name") String name);

    Integer getRoleByName(@Param("name") String name, @Param("pid") Integer pid ,@Param("id") Integer id);

    List<Map<String,Object>> getMyRoleList( @Param("pid") Integer pid);

    List<RoleUserOutputDTO> getRoleUserList(Integer id);

    Integer getRoleTotal(Integer id);
}
